﻿namespace UsingClassesAndObjects
{
    using System;

    class TriangleSurfaceMathClass
    {
        // 1.2.10.04. Write methods that calculate the surface of a triangle by given:
        // Side and an altitude to it; Three sides; Two sides and an angle between them. Use System.Math.

        public static double TriangleSurfaceBySideAndAltitude(double side, double altitude)
        {
            return side * altitude / 2;
        }

        public static double TriangleSurfcaeByThreeSides(double a, double b, double c)
        {
            double s = (a + b + c) / 2;
            return Math.Sqrt(s * (s - a) * (s - b) * (s - c));
        }

        public static double TriangleSurfaceByTwoSidesAndAngle(double a, double b, double beta)
        {
            return (a * b * Math.Sin(beta)) / 2;
        }

        static void Main()
        {
            
        }
    }
}